package com.futureweaver.service.impl;

import com.futureweaver.domain.Prescription;
import com.futureweaver.domain.Register;
import com.futureweaver.mapper.PrescriptionMapper;
import com.futureweaver.service.PrescriptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PrescriptionServiceImpl implements PrescriptionService {
    @Autowired
    private PrescriptionMapper mapper;

    @Override
    public boolean insert(Prescription prescription) {
        return mapper.insert(prescription) == 1;
    }

    @Override
    public List<Prescription> query(Register register) {
        return mapper.query(register);
    }

    @Override
    public boolean update(Prescription prescription) {
        return mapper.update(prescription) == 1;
    }
}
